package br.com.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import br.com.biblioteca.Book;
import br.com.carrinho.ShoopingCart;


@WebServlet("/Verificar.do")
public class VerifyBookListCartServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
  
    public VerifyBookListCartServlet() {
        super();
       
    }


	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	   
		PrintWriter out = response.getWriter();	
		HttpSession session = request.getSession(false);  
	    ShoopingCart lista = (ShoopingCart) session.getAttribute("usuario");
	    
	    out.print(lista.getContent());
	    out.print("<br/><a href='Catalog.do'>Catalogo de livros</a>");
	    
	    
	}


	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
	}

}
